<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
		function smallestCommons(arr) {
			var min,max;
			if(arr[0]>arr[1]){
				max=arr[0];
				min=arr[1];
			}else{
				max=arr[1];
				min=arr[0];
			}
			var num=max;
			for(var i=min;i<=max;i++){
				if(num/i==Math.floor(num/i)){
					if(i==max){
						break;
					}
				}else{
					i=min
					num++;
				}
			}
		    return num;
		}
		
		
		document.write(smallestCommons([1,5]));	
		</script>
	</body>
</html>
